package com.luugiathuy.apps.remotebluetooth;

import java.util.ArrayList;

public class Action {
	ArrayList<String> commands;
	
	public Action()
	{
		commands = new ArrayList<String>();
	}
	
	public void addAction(String action)
	{
		commands.add(action);
	}
	
	public boolean removeAction(int index)
	{
		if(commands.remove(index)!=null)
			return true;
		else
			return false;
	}
	
	public String print()
	{
		int size = commands.size();
		String result = "";
		for(int i=0; i<size-1; i++)
		{
			result += commands.get(i).toString()+" + ";
		}
		result += commands.get(size-1).toString();
		return result;
	}
	
	
}
